Repository navigation
feat(pools): add opt-in reset-aware account pool scheduling - #55
Conversation
Behind POOL_RESET_SCHEDULING_ENABLED, account pools use fresh reset observations from usage snapshots and response metadata the gateway already receives. Within the existing pool and priority tier, freshly exhausted accounts are skipped and the earliest fresh reset goes first; stale, missing or contradictory observations keep the existing order. When every account is cooling or exhausted, the existing 429 carries a Retry-After from the soonest fresh reset instead of sending another request. NanoGPT key validation keeps its existing cadence, and the scheduler adds no probes. Observations live in process for POOL_OBSERVATION_TTL_SECONDS and store only HMAC credential identities.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
multillm-proxy | 2e27ecc | Oct 09 2026, 02:09 AM |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
c2d897a
into
integrate/gateway-waves-1-4
Summary
Adds opt-in reset-aware account pool scheduling. With
POOL_RESET_SCHEDULING_ENABLEDoff (the default), account selection, cooldowns, usage snapshots and errors are unchanged. Tests compare whole selection sequences with the flag on and off.retry_after_secondscounts as an exhausted window with a relative reset.Retry-Aftercomes from the soonest fresh reset, clamped to 1–3,600 s.POOL_OBSERVATION_TTL_SECONDSdefaults to 60 and accepts 5–3,600.Details are in
docs/pool-reset-scheduling.md.Review rounds
Round 1 skipped NanoGPT's existing validation probes whenever the feature was on. That removed a safeguard against revoked keys. Round 2 restores them unchanged, and tests prove the probe sequence matches flag-off when there are no observations.
Shared registrations
POOL_RESET_SCHEDULING_ENABLEDandPOOL_OBSERVATION_TTL_SECONDSare added to the Container env keys. There are no routes, Worker modules, tables or headers.Left for the Wave 5 integration
Optional: pass parsed usage windows from responses into the pool result calls (
usage_windows):proxy_service.make_request→CredentialPool.record_headers;routes/proxy.py→NanoGPTKeyPool.record_result;intelligence_transport→NanoGPTUnifiedKeyPool.record_result.Until then, observations come from usage snapshots and classified quota 429s.
Tests
tests/test_pool_reset_scheduling.pycovers:npm run test:worker: 1,460 passed.npm run test:integration: 7 passed.test:deploy, free routes, client headers and thewrangler deploy --dry-runbundle all pass.CI notes
python/nodejobs: the dependency-audit steps fail on every branch, including main. fix(deps): clear the CI dependency audit advisories #42 fixes that.AdmissionCoordinatorDurable Object migration, whichwrangler versions uploadcannot apply. This is expected untilwrangler deployruns on main.This is part of Wave 5. It is based on
integrate/gateway-waves-1-4, the Wave 4 integration branch. The README line comes with the Wave 5 integration PR.